using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using T2.WebSecurity.Data.Entities.Interfaces;
using T2.WebSecurity.Data.Entities;
using T2.WebSecurity.Business.Entities.Interfaces;
using T2.WebSecurity.Business.Entities;
using T2.WebSecurity.Business.Entities.Search.Interfaces;
using T2.WebSecurity.Data.Entities.Search.Interfaces;
using T2.WebSecurity.Data.Entities.Search;


//--Change Management Control - OAuthMembership Business Translator  --**********************
//--Created By: trooks
//--Description: OAuthMembership Translator
//--Created Date: 03/07/2013 10:48:43
//--*************************************************************

namespace T2.WebSecurity.Business.Translators
{
	public static class OAuthMembershipTranslator 
	{
		public static IOAuthMembership TranslateToDataLayer(IOAuthMembership_biz _translateFrom)
        {
            IOAuthMembership temp = new OAuthMembership();

		
			if(_translateFrom != null)
			{
			temp.Action = _translateFrom.Action;
			temp.Caller = _translateFrom.Caller;
			temp.Role = _translateFrom.Role;
			temp.PageSize = _translateFrom.PageSize;
			temp.PageNumber = _translateFrom.PageNumber;
			temp.SortColumn = _translateFrom.SortColumn;
			temp.SortType = _translateFrom.SortType;
			temp.TotalRows = _translateFrom.TotalRows;
			temp.OAuthMembershipID = _translateFrom.OAuthMembershipID;
			temp.Provider = _translateFrom.Provider;
			temp.ProviderUserID = _translateFrom.ProviderUserID;
			temp.TS = _translateFrom.TS;
			temp.CreatedBy = _translateFrom.CreatedBy;
			temp.CreatedDt = _translateFrom.CreatedDt;
			temp.ModifiedBy = _translateFrom.ModifiedBy;
			temp.ModifiedDt = _translateFrom.ModifiedDt;
			temp.UserId = _translateFrom.UserId;
			}
            return temp;
        }
		
		public static IOAuthMembershipSearch TranslateSearchToDataLayer(IOAuthMembershipSearch_biz _translateFrom)
        {
            IOAuthMembershipSearch temp = new OAuthMembershipSearch();
		
			if(_translateFrom != null)
			{
			temp.Action = _translateFrom.Action;
			temp.Caller = _translateFrom.Caller;
			temp.Role = _translateFrom.Role;
			temp.PageSize = _translateFrom.PageSize;
			temp.PageNumber = _translateFrom.PageNumber;
			temp.SortColumn = _translateFrom.SortColumn;
			temp.SortType = _translateFrom.SortType;
			temp.TotalRows = _translateFrom.TotalRows;
			temp.Provider = _translateFrom.Provider;
			}
            return temp;
        }

        public static IOAuthMembership_biz TranslateFromDataLayer(IOAuthMembership _translateFrom)
        {
            IOAuthMembership_biz temp = new OAuthMembership_biz();
			if(_translateFrom != null)
			{
			temp.Action = _translateFrom.Action;
			temp.Caller = _translateFrom.Caller;
			temp.Role = _translateFrom.Role;
			temp.PageSize = _translateFrom.PageSize;
			temp.PageNumber = _translateFrom.PageNumber;
			temp.SortColumn = _translateFrom.SortColumn;
			temp.SortType = _translateFrom.SortType;
			temp.TotalRows = _translateFrom.TotalRows;
			temp.OAuthMembershipID = _translateFrom.OAuthMembershipID;
			temp.Provider = _translateFrom.Provider;
			temp.ProviderUserID = _translateFrom.ProviderUserID;
			temp.TS = _translateFrom.TS;
			temp.CreatedBy = _translateFrom.CreatedBy;
			temp.CreatedDt = _translateFrom.CreatedDt;
			temp.ModifiedBy = _translateFrom.ModifiedBy;
			temp.ModifiedDt = _translateFrom.ModifiedDt;
			temp.UserId = _translateFrom.UserId;
			}
            return temp;
        
        }
	
	}
	
}
